package cn.young.javalearning.designpattern.strategy.simpleStrategy;

import cn.young.javalearning.designpattern.strategy.simpleStrategy.pro.ShoppingStrategyFacotryEnum;
import cn.young.javalearning.designpattern.strategy.simpleStrategy.pro.ShoppingStrategyFactory;

public class Main {
    public static void main(String[] args) throws Exception {
        new ShopMan(new CaiShiChangStrategy()).shopping();
        new ShopMan(new ShangChangStrategy()).shopping();
        new ShopMan(ShoppingStrategyFactory.getInstance(ShoppingStrategyFactory.ShoppingStrategy.CAISHICHANG_STRATEGY)).shopping();
        new ShopMan(ShoppingStrategyFacotryEnum.CAISHICHANG_STRATEGY.getShoppingStrategy()).shopping();
    }
}
